/*global angular,$,$script,WebUploader*/
var app;
!function(){
  "use strict";
  //@formatter:off
  angular.module("app", [
    "ngAnimate",
    "ngAria",
    "ngMaterial",
    "ngTagsInput",
    "ui.router",
    "ui.bootstrap",
    "textAngular",
    "angular-loading-bar",
    "ng.ueditor",
    "duScroll",
    "app.nav",
    "app.service",
    "app.directives",
    "app.stat",
    'app.my',
    "app.sys",
    "app.project",
  ]);
  //@formatter:on
}(), function(){
  "use strict";
  //demo http://www.cnblogs.com/EugeneMay/p/4271748.html
  app = angular.module("app");
  app.loader = function(js){
    return ["$q", "$rootScope", function($q, $rootScope){
      var deferred = $q.defer();
      var dependencies = angular.copy(js);
      $script(dependencies, function(){
        $rootScope.$apply(function(){
          deferred.resolve();
        });
      });
      return deferred.promise;
    }];
  };
  angular.module("app").config(["$stateProvider", "$urlRouterProvider", function($stateProvider, $urlRouterProvider){
    var routes, routerLoader;
    //@formatter:off
    routes = [
      "sign/in"
    ];
      //@formatter:on
    routerLoader = function(router){
      var config, url;
      return url = "/" + router, config = {
        url: url,
        templateUrl: url
      }, $stateProvider.state(router, config), $stateProvider;
    };
    routes.forEach(function(route){
      return routerLoader(route);
    });
    $urlRouterProvider.when("/", "/dashboard").otherwise("/dashboard");
  }]).config(['$httpProvider', function($httpProvider){
    $httpProvider.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded;charset=utf-8";
    $httpProvider.defaults.headers.post["X-Requested-With"] = "XMLHttpRequest";
    //$provider.interceptors.push('UserInterceptor');
  }]).run(["$rootScope", "$state", "$http", "$window", "$modal", "$modalService", function($rootScope, $state, $http, $window, $modal, $modalService){
    $rootScope.dateOpts = {
      'starting-day': 1,
      'show-weeks': false
    };
    $rootScope.MenuUrl = ($.cookie('uid') != undefined && $.cookie('uid') != '') ? '/index/sidebar/' : '';
    $rootScope.$on("$stateChangeSuccess", function(event, toState, toParams, fromState, fromParams){
      if(toState.name == 'sign/in')return;
      $rootScope.LoginUid = ($.cookie('uid') != undefined && $.cookie('uid') != '') ? $.cookie('uid') : '';
      if(!$rootScope.LoginUid || $rootScope.LoginUid == ''){
        event.preventDefault();
        $state.go("sign/in", {});
        setTimeout(function(){
          $window.location.reload();
        }, 200);
      }
    });
    $rootScope.signout = function(){
      $.cookie('uid', '');
      $http({
        method: 'POST',
        url: '/sign/out/',
        data: {}
      }).success(function(){
        $state.go("sign/in", {}, {reload: true});
        setTimeout(function(){
          $window.location.reload();
        }, 200);
      });
    };
    $rootScope.reload = function(){
      //console.log($state.current.name);
      //$state.transitionTo($state.current, $state.$current.params, { reload: true, inherit: true, notify: true });
      $window.location.reload();
    };
    $rootScope.viewImage = function(image){
      $modalService.myAlert('<img style="width:100%" src="' + image + '"/>');
    };
    $rootScope.viewUser = function(uid){
      if(uid == '0'){
        return;
      }
      $http.post('/user/index/profile/', {
        uid: uid
      }, {
        transformRequest: function(data){
          return $.param(data);
        }
      }).success(function(ret){
        if(ret.status){
          var $modalInstance = $modal.open({
            templateUrl: "/user/index/profile/",
            controller: "ViewUserCtrl",
            backdrop: true,
            size: 'lg',
            resolve: {
              data: function(){
                return ret.data;
              }
            }
          });
          $modalInstance.result.then(function(status){
          }, function(status){
          });
        }else{
          $modalService.myAlert(ret.data);
        }
      }).error(function(){
        $modalService.myAlert('系统错误，请求资源失败！');
      });
    }
    app.register.controller("ViewUserCtrl", ["$scope", "$modalInstance", "data", function($scope, $modalInstance, data){
      $scope.entity = data;
      $scope.cancel = function(){
        $modalInstance.dismiss("cancel");
      };
    }]);
  }]);
}(), function(){
  "use strict";
  angular.module("app").config(["$mdThemingProvider", function($provider){
    $provider.theme("default").primaryPalette("indigo", {"default": "500"}).accentPalette("cyan", {"default": "500"}).warnPalette("red", {"default": "500"}).backgroundPalette("grey");
  }]).controller("AppCtrl", ["$scope", "$rootScope", "$state", "$http", "$window", function($scope, $rootScope, $state, $http, $window){
    $scope.main = {
      brand: "美赞臣-CRM管理后台",
      year: (new Date).getFullYear()
    }, $scope.pageTransitionOpts = [{
      name: "Fade up",
      "class": "animate-fade-up"
    }, {
      name: "Scale up",
      "class": "ainmate-scale-up"
    }, {
      name: "Slide in from right",
      "class": "ainmate-slide-in-right"
    }, {
      name: "Flip Y",
      "class": "animate-flip-y"
    }], $scope.getPageTransition = function(){
      var _opt = false, _name = $.cookie('pageTransition.name');
      $.each($scope.pageTransitionOpts, function(k, v){
        if(v.name == _name){
          _opt = v;
          return;
        }
      });
      return _opt ? _opt : $scope.pageTransitionOpts[0];
    }, $scope.admin = {
      layout: ($.cookie('layout') != undefined && $.cookie('layout') != '') ? $.cookie('layout') : "wide",
      menu: ($.cookie('menu') != undefined && $.cookie('menu') != '') ? $.cookie('menu') : "vertical",
      fixedHeader: ($.cookie('fixedHeader') != undefined && $.cookie('fixedHeader') != '0') ? false : true,
      fixedSidebar: ($.cookie('fixedSidebar') != undefined && $.cookie('fixedSidebar') != '0') ? false : true,
      pageTransition: $scope.getPageTransition(),
      skin: ($.cookie('skin') != undefined && $.cookie('skin') != '') ? $.cookie('skin') : '21'
    }, $scope.$watch("admin", function(c, d){
      c.skin != d.skin ? $.cookie('skin', c.skin, {expires: 365}) : '';
      c.layout != d.layout ? $.cookie('layout', c.layout, {expires: 365}) : '';
      c.menu != d.menu ? $.cookie('menu', c.menu, {expires: 365}) : '';
      c.fixedHeader != d.fixedHeader ? $.cookie('fixedHeader', c.fixedHeader ? 0 : 1, {expires: 365}) : '';
      c.fixedSidebar != d.fixedSidebar ? $.cookie('fixedSidebar', c.fixedSidebar ? 0 : 1, {expires: 365}) : '';
      c.pageTransition.name != d.pageTransition.name ? $.cookie('pageTransition.name', c.pageTransition.name, {expires: 365}) : '';
      "horizontal" === c.menu && "vertical" === d.menu && $rootScope.$broadcast("nav:reset"), c.fixedHeader === !1 && c.fixedSidebar === !0 && (d.fixedHeader === !1 && d.fixedSidebar === !1 && ($scope.admin.fixedHeader = !0, $scope.admin.fixedSidebar = !0), d.fixedHeader === !0 && d.fixedSidebar === !0 && ($scope.admin.fixedHeader = !1, $scope.admin.fixedSidebar = !1)), c.fixedSidebar === !0 && ($scope.admin.fixedHeader = !0), c.fixedHeader === !1 && ($scope.admin.fixedSidebar = !1);
    }, !0), $scope.color = {
      primary: "#3F51B5",
      success: "#4CAF50",
      info: "#00BCD4",
      infoAlt: "#673AB7",
      warning: "#FFC107",
      danger: "#F44336",
      gray: "#DCDCDC"
    };
    $scope.goTop = function(){
      $window.scrollTo(0, 0);
    };
    $scope.goBottom = function(){
      $window.scrollTo(0, $(document).height());
    };
  }]).controller("SigninCtrl", ["$scope", "$rootScope", "$state", '$window', '$document', "$http", "$modalService", function($scope, $rootScope, $state, $window, $document, $http, $modalService){
    $scope.login = {
      account: '',
      password: ''
    };
    $scope.submit = function(){
      if($scope.login.account == ''){
        $modalService.myAlert("登录失败，账户名称不能为空！");
        return;
      }
      if($scope.login.password == ''){
        $modalService.myAlert("登录失败，账户密码不能为空！");
        return;
      }
      $http({
        method: 'POST',
        url: '/sign/in/',
        data: $.param($scope.login)
      }).success(function(data){
        if(data.status){
          $rootScope.LoginUid = data.uid;
          $rootScope.MenuUrl = '/index/sidebar/';
          //@formatter:off
          $state.go("dashboard", {}, {reload: true, inherit: true, notify: true});
          //@formatter:on
        }else{
          $modalService.myAlert(data.data);
        }
      }).error(function(){
        $modalService.myAlert("登录失败，系统错误！");
      });
    };
    $document.bind("keypress", function(event){
      $scope.$apply(function(){
        if(event.keyCode == 13){
          $scope.submit();
        }
      });
    });
  }]).controller("NavCtrl", ["$scope", "$rootScope", "$state", "$document", function($scope, $rootScope, $state, $document){
  }]);
}(), function(){
  "use strict";
  angular.module("app.directives", []).directive("customPage", function(){
    return {
      restrict: "A",
      controller: ["$scope", "$element", "$location", function($scope, $element, $location){
        var resetClass, path;
        path = function(){
          return $location.path();
        }, resetClass = function(a){
          switch($element.removeClass("body-wide body-err body-lock body-auth"), a){
            case"/404":
            case"/pages/404":
            case"/pages/500":
              return $element.addClass("body-wide body-err");
            case"/pages/signin":
            case"/sign/in":
            case"/pages/signup":
            case"/pages/forgot-password":
              return $element.addClass("body-wide body-auth");
            case"/pages/lock-screen":
              return $element.addClass("body-wide body-lock");
          }
        }, resetClass($location.path()), $scope.$watch(path, function(n, o){
          return n !== o ? resetClass($location.path()) : void 0;
        });
      }]
    };
  }).directive("webuploader", [function(){
    return {
      restrict: "EA",
      controller: ["$scope", "$element", "$modalService", function($scope, $element, $modalService){
        var uploader = WebUploader.create({
          auto: true,
          duplicate: true,
          compress: false,
          swf: '/assets/webuploader/Uploader.swf',
          server: $element.attr('data-uploader-server'),
          pick: '#' + $element.attr('id'),
          accept: {
            title: 'Images',
            extensions: 'gif,jpg,jpeg,png',
            mimeTypes: 'image/*'
          }
        });
        uploader.on('uploadError', function(){
          $modalService.myAlert('上传文件失败，系统错误！');
        });
        uploader.on('uploadSuccess', function(file, response){
          if(response.status){
            var target = $('#' + $element.attr('data-ret-to'));
            //target.val((response.data).trim());
            //target.trigger("change");
            $scope.$apply(function(){
              eval('$scope.' + target.attr("ng-model") + '=response.data.trim()');
            });
          }else{
            $modalService.myAlert(response.data);
          }
        });
        uploader.on('uploadComplete', function(file){
          //console.log(file);
        });
      }]
    };
  }]).directive("webuploaderFile", [function(){
    return {
      restrict: "EA",
      controller: ["$scope", "$element", "$modalService", function($scope, $element, $modalService){
        var uploader = WebUploader.create({
          auto: true,
          duplicate: true,
          compress: false,
          swf: '/assets/webuploader/Uploader.swf',
          server: $element.attr('data-uploader-server'),
          pick: '#' + $element.attr('id'),
          accept: {
            title: 'file',
            extensions: '*.*'
          }
        });
        uploader.on('uploadError', function(){
          $modalService.myAlert('上传文件失败，系统错误！');
        });
        uploader.on('uploadSuccess', function(file, response){
          if(response.status){
            var target = $('#' + $element.attr('data-ret-to'));
            //target.val((response.data).trim());
            //target.trigger("change");
            $scope.$apply(function(){
              eval('$scope.' + target.attr("ng-model") + '=response.data.trim()');
            });
          }else{
            $modalService.myAlert(response.data);
          }
        });
        uploader.on('uploadComplete', function(file){
          //console.log(file);
        });
      }]
    };
  }]).filter('trust', ['$sce', function($sce){
    return function(text){
      return $sce.trustAsHtml(text);
    };
  }]);
}(), function(){
  "use strict";
  angular.module("app.service", []).service("$modalService", ["$modal", function($modal){
    this.myAlert = function(message){
      $modal.open({
        templateUrl: "/commons/alert/",
        controller: "MyAlertCtrl",
        backdrop: true,
        size: 'sm',
        resolve: {
          message: function(){
            return message;
          }
        }
      });
    };
    this.myConfirm = function(message, confirm, cancel){
      var $modalInstance = $modal.open({
        templateUrl: "/commons/confirm/",
        controller: "MyConfirmCtrl",
        backdrop: true,
        size: 'sm',
        resolve: {
          message: function(){
            return message;
          }
        }
      });
      $modalInstance.result.then(function(){
        confirm();
      }, function(){
        cancel();
      });
    };
  }]).controller("MyAlertCtrl", ["$scope", "$modalInstance", "message", function($scope, $modalInstance, message){
    $scope.message = message;
    $scope.cancel = function(){
      $modalInstance.dismiss("cancel");
    };
  }]).controller("MyConfirmCtrl", ["$scope", "$modalInstance", "message", function($scope, $modalInstance, message){
    $scope.message = message;
    $scope.cancel = function(){
      $modalInstance.dismiss("cancel");
    };
    $scope.confirm = function(){
      $modalInstance.close();
    };
  }]);
}(), function(){
  "use strict";
  angular.module("app.nav", []).directive("toggleNavCollapsedMin", ["$rootScope", function($rootScope){
    return {
      restrict: "A",
      link: function(scope, ele){
        var app;
        return app = $("#app"), ele.on("click", function(e){
          return app.hasClass("nav-collapsed-min") ? app.removeClass("nav-collapsed-min") : (app.addClass("nav-collapsed-min"), $rootScope.$broadcast("nav:reset")), e.preventDefault();
        });
      }
    };
  }]).directive("collapseNav", [function(){
    return {
      restrict: "A",
      link: function(scope, ele, c){
        var $a, $aRest, $app, $lists, $listsRest, $nav, $window, Timer, prevWidth, speed, updateClass, $menu;
        speed = 550, $window = $(window), $lists = ele.find("ul").parent("li"), $lists.append('<i class="fa fa-angle-down icon-has-ul-h"></i><i class="fa fa-angle-right icon-has-ul"></i>'), $a = $lists.children("a"), $listsRest = ele.children("li").not($lists), $aRest = $listsRest.children("a"), $app = $("#app"), $nav = $("#nav-container"), $menu = ele.find("ul").children('li').children('a')
        $a.on("click", function(a){
          var $parent, $this;
          return $app.hasClass("nav-collapsed-min") || $nav.hasClass("nav-horizontal") && $window.width() >= 768 ? !1 : ($this = $(this), $parent = $this.parent("li"), $lists.not($parent).removeClass("open").find("ul").slideUp(speed), $parent.toggleClass("open").find("ul").stop().slideToggle(speed), void a.preventDefault());
        }), $menu.on("click", function(a){
          $app.hasClass("nav-collapsed-min") ? $lists.removeClass("open").hasClass('active') && $lists.removeClass("open").find("ul").stop().slideUp(speed) : null;
        }), $aRest.on("click", function(){
          return $lists.removeClass("open").find("ul").slideUp(speed);
        }), scope.$on("nav:reset", function(){
          return $lists.removeClass("open").find("ul").slideUp(speed);
        }), Timer = void 0, prevWidth = $window.width(), updateClass = function(){
          var currentWidth;
          return currentWidth = $window.width(), 768 > currentWidth && $app.removeClass("nav-collapsed-min"), 768 > prevWidth && currentWidth >= 768 && $nav.hasClass("nav-horizontal") && $lists.removeClass("open").find("ul").slideUp(speed), prevWidth = currentWidth;
        }, $window.resize(function(){
          //var t = setTimeout(updateClass, 300);
          //clearTimeout(t);
        });
      }
    };
  }]).directive("highlightActive", [function(){
    return {
      restrict: "A",
      controller: ["$scope", "$element", "$attrs", "$location", function($scope, $element, $attrs, $location){
        var highlightActive, links, path;
        var $nav = $(".nav-container");
        return links = $element.find("a"), path = function(){
          return $location.path();
        }, highlightActive = function(links, path){
          return path = "#" + path, angular.forEach(links, function(link){
            var isHorizontal = $nav.hasClass("nav-horizontal") ? true : (($.cookie('menu') != undefined && $.cookie('menu') != '' && $.cookie('menu') == 'horizontal') ? true : false);
            var $li, $link, href;
            return $link = angular.element(link), $li = $link.parent("li"), href = $link.attr("href"), $li.hasClass("active") && $li.removeClass("active"), 0 === path.indexOf(href) ? $li.addClass("active") && (!isHorizontal ? $li.find("ul").show() : void 0) : void 0;
          });
        }, highlightActive(links, $location.path()), $scope.$watch(path, function(newVal, oldVal){
          return newVal !== oldVal ? highlightActive(links, $location.path()) : void 0;
        });
      }]
    };
  }]).directive("toggleOffCanvas", [function(){
    return {
      restrict: "A",
      link: function(scope, ele){
        return ele.on("click", function(){
          return $("#app").toggleClass("on-canvas");
        });
      }
    };
  }]);
}(), function(){
  app.config(["$controllerProvider", "$compileProvider", "$filterProvider", "$provide", "$stateProvider", function($controllerProvider, $compileProvider, $filterProvider, $provide, $stateProvider){
    app.register = {
      controller: $controllerProvider.register,
      directive: $compileProvider.directive,
      filter: $filterProvider.register,
      factory: $provide.factory,
      service: $provide.service
    };
    $stateProvider.state('dashboard', {
      url: '/dashboard',
      templateUrl: '/dashboard/',
      resolve: {
        load: app.loader('/assets/js/m/dashboard.js')
      }
    });
  }]);
}(), function(){
  "use strict";
  angular.module("app.stat", []).config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', "$stateProvider", function($controllerProvider, $compileProvider, $filterProvider, $provide, $stateProvider){
    angular.module("app.stat").register = {
      controller: $controllerProvider.register,
      directive: $compileProvider.directive,
      filter: $filterProvider.register,
      factory: $provide.factory,
      service: $provide.service
    };
    $stateProvider.state('stat/sms/captcha', {
      url: '/stat/sms/captcha',
      templateUrl: '/stat/sms/captcha',
      resolve: {
        load: app.loader('/assets/js/m/stat/sms.js')
      }
    }).state('stat/mediaclick', {
      url: '/stat/mediaclick',
      templateUrl: '/stat/mediaclick',
      resolve: {
        load: app.loader('/assets/js/m/stat/mediaclick.js')
      }
    }).state('stat/sms/notice', {
      url: '/stat/sms/notice',
      templateUrl: '/stat/sms/notice',
      resolve: {
        load: app.loader('/assets/js/m/stat/sms.js')
      }
    }).state('stat/sms/saleforce', {
      url: '/stat/sms/saleforce',
      templateUrl: '/stat/sms/saleforce',
      resolve: {
        load: app.loader('/assets/js/m/stat/sms.js')
      }
    }).state('stat/hd/p7300', {
      url: '/stat/hd/p7300',
      templateUrl: '/stat/hd/p7300',
      resolve: {
        load: app.loader('/assets/js/m/stat/hd.js')
      }
    }).state('stat/hd/p7288', {
      url: '/stat/hd/p7288',
      templateUrl: '/stat/hd/p7288',
      resolve: {
        load: app.loader('/assets/js/m/stat/hd.js')
      }
    }).state('stat/special', {
      url: '/stat/special',
      templateUrl: '/stat/special/index',
      resolve: {
        load: app.loader('/assets/js/m/stat/special.js')
      }
    }).state('stat/nc', {
      url: '/stat/nc',
      templateUrl: '/stat/nc/index',
      resolve: {
        load: app.loader('/assets/js/m/stat/nc.js')
      }
    }).state('stat/wlist/imt', {
      url: '/stat/wlist/imt',
      templateUrl: '/stat/wlist/imt',
      resolve: {
        load: app.loader('/assets/js/m/stat/wlist.js')
      }
    }).state('stat/wlistlog', {
      url: '/stat/wlistlog',
      templateUrl: '/stat/wlistlog/index',
      resolve: {
        load: app.loader('/assets/js/m/stat/wlistlog.js')
      }
    })
    ;
  }]);
}(), function(){
  "use strict";
  angular.module("app.project", []).config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', "$stateProvider", function($controllerProvider, $compileProvider, $filterProvider, $provide, $stateProvider){
    angular.module("app.project").register = {
      controller: $controllerProvider.register,
      directive: $compileProvider.directive,
      filter: $filterProvider.register,
      factory: $provide.factory,
      service: $provide.service
    };
    $stateProvider.state('project/index', {
      url: '/project/index',
      templateUrl: '/project/index/index',
      resolve: {
        load: app.loader('/assets/js/m/project/idx.js')
      }
    }).state('project/sms', {
      url: '/project/sms',
      templateUrl: '/project/sms/index',
      resolve: {
        load: app.loader('/assets/js/m/project/sms.js')
      }
    }).state('project/mms', {
      url: '/project/mms',
      templateUrl: '/project/mms/index',
      resolve: {
        load: app.loader('/assets/js/m/project/mms.js')
      }
    }).state('project/notice', {
      url: '/project/notice',
      templateUrl: '/project/notice/index',
      resolve: {
        load: app.loader('/assets/js/m/project/notice.js')
      }
    });
  }]);
}(), function(){
  "use strict";
  angular.module("app.my", []).config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', "$stateProvider", function($controllerProvider, $compileProvider, $filterProvider, $provide, $stateProvider){
    angular.module("app.my").register = {
      controller: $controllerProvider.register,
      directive: $compileProvider.directive,
      filter: $filterProvider.register,
      factory: $provide.factory,
      service: $provide.service
    };
    $stateProvider.state('my/detail', {
      url: '/my/detail',
      templateUrl: '/my/index/detail/',
      resolve: {
        load: app.loader('/assets/js/m/my/idx.js')
      }
    }).state('my/resetpassword', {
      url: '/my/resetpassword',
      templateUrl: '/my/index/resetpassword/',
      resolve: {
        load: app.loader('/assets/js/m/my/idx.js')
      }
    }).state('my/resetprofile', {
      url: '/my/resetprofile',
      templateUrl: '/my/index/resetprofile/',
      resolve: {
        load: app.loader('/assets/js/m/my/idx.js')
      }
    });
  }]);
}(), function(){
  "use strict";
  angular.module("app.sys", []).config(['$controllerProvider', '$compileProvider', '$filterProvider', '$provide', "$stateProvider", function($controllerProvider, $compileProvider, $filterProvider, $provide, $stateProvider){
    angular.module("app.sys").register = {
      controller: $controllerProvider.register,
      directive: $compileProvider.directive,
      filter: $filterProvider.register,
      factory: $provide.factory,
      service: $provide.service
    };
    $stateProvider.state('sys/user', {
      url: '/sys/user',
      templateUrl: '/sys/user/',
      resolve: {
        load: app.loader('/assets/js/m/sys/user.js')
      }
    }).state('sys/menu', {
      url: '/sys/menu',
      templateUrl: '/sys/menu/',
      resolve: {
        load: app.loader('/assets/js/m/sys/menu.js')
      }
    }).state('sys/role', {
      url: '/sys/role',
      templateUrl: '/sys/role/',
      resolve: {
        load: app.loader('/assets/js/m/sys/role.js')
      }
    }).state('sys/project', {
      url: '/sys/project',
      templateUrl: '/sys/project/',
      resolve: {
        load: app.loader('/assets/js/m/sys/project.js')
      }
    }).state('sys/mobile', {
      url: '/sys/mobile',
      templateUrl: '/sys/mobile/',
      resolve: {
        load: app.loader('/assets/js/m/sys/mobile.js')
      }
    }).state('sys/receipt', {
      url: '/sys/receipt',
      templateUrl: '/sys/receipt',
      resolve: {
        load: app.loader('/assets/js/m/sys/receipt.js')
      }
    }).state('sys/hide', {
      url: '/sys/hide',
      templateUrl: '/sys/hide',
      resolve: {
        load: app.loader('/assets/js/m/sys/hide.js')
      }
    });
  }]);
}();